Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACM-17553: Save version of imported clusters - ACM 2.12 #7250

Conversation

jhernand
Copy link
Contributor

This is a backport of OCPBUGS-42059 and #7249 for ACM 2.12.

Currently when a cluster is imported the openshift_version column of the database is not populated. As a result that version will not be available for validations, in particular for the validation that checks if dual-stack VIPs are supported. A side effect of that is that adding a node to a cluster with dual-stack VIPs will always fail with an error message like this, regardless of the version:

"dual-stack VIPs are not supported in OpenShift "

That error happens because we are trying to see if the version is less than 4.12, but the result is always true because the version is empty.

To avoid that this patch changes the cluster import code so that it populates the openshift_version database column.

List all the issues related to this PR

https://issues.redhat.com/browse/ACM-17553
https://issues.redhat.com/browse/OCPBUGS-42059

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 31, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 31, 2025

@jhernand: This pull request references ACM-17553 which is a valid jira issue.

In response to this:

This is a backport of OCPBUGS-42059 and #7249 for ACM 2.12.

Currently when a cluster is imported the openshift_version column of the database is not populated. As a result that version will not be available for validations, in particular for the validation that checks if dual-stack VIPs are supported. A side effect of that is that adding a node to a cluster with dual-stack VIPs will always fail with an error message like this, regardless of the version:

"dual-stack VIPs are not supported in OpenShift "

That error happens because we are trying to see if the version is less than 4.12, but the result is always true because the version is empty.

To avoid that this patch changes the cluster import code so that it populates the openshift_version database column.

List all the issues related to this PR

https://issues.redhat.com/browse/ACM-17553
https://issues.redhat.com/browse/OCPBUGS-42059

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 31, 2025
@openshift-ci openshift-ci bot requested review from oourfali and pastequo January 31, 2025 12:43
@jhernand jhernand changed the title ACM-17553: Save version of imported clusters ACM-17553: Save version of imported clusters - ACM 2.12 Jan 31, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.62%. Comparing base (a5e16aa) to head (6e6c6e7).
Report is 3 commits behind head on release-ocm-2.12.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           release-ocm-2.12    #7250      +/-   ##
====================================================
+ Coverage             68.30%   68.62%   +0.31%     
====================================================
  Files                   257      257              
  Lines                 37611    37950     +339     
====================================================
+ Hits                  25692    26043     +351     
+ Misses                 9635     9618      -17     
- Partials               2284     2289       +5     
Files with missing lines Coverage Δ
internal/bminventory/inventory.go 73.24% <100.00%> (+2.53%) ⬆️
...oller/controllers/clusterdeployments_controller.go 71.57% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

@gamli75
Copy link
Contributor

gamli75 commented Feb 2, 2025

/retest-required

This is a backport of OCPBUGS-42059 for ACM 2.12.

Currently when a cluster is imported the `openshift_version` column of
the database is not populated. As a result that version will not be
available for validations, in particular for the validation that checks
if dual-stack VIPs are supported. A side effect of that is that adding a
node to a cluster with dual-stack VIPs will always fail with an error
message like this, regardless of the version:

```
"dual-stack VIPs are not supported in OpenShift "
```

That error happens because we are trying to see if the version is less
than 4.12, but the result is always true because the version is empty.

To avoid that this patch changes the cluster import code so that it
populates the `openshift_version` database column.

Related: https://issues.redhat.com/browse/ACM-17553
Related: https://issues.redhat.com/browse/OCPBUGS-42059
Signed-off-by: Juan Hernandez <[email protected]>
@jhernand jhernand force-pushed the save_openshift_version_for_imported_clusters_acm_2_12 branch from 4671cf3 to 6e6c6e7 Compare February 3, 2025 19:21
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2025
Copy link

openshift-ci bot commented Feb 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gamli75, jhernand

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2025
Copy link

openshift-ci bot commented Feb 4, 2025

@jhernand: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit b80d433 into openshift:release-ocm-2.12 Feb 4, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants